package br.com.dreamsource.mobile.worders.remote;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.Enumeration;
//import org.ksoap.SoapEnvelope;
//import org.ksoap.SoapObject;
//import org.ksoap.transport.HttpTransport;

/**
 *
 * @author Elizeu Nogueira da Rosa Jr.
 * @version 0.1
 * @date 15.05.2007
 *
 */

public class WSController {
    
//    private SoapObject soapClient;
//    private HttpTransport transport;
    private WSRequest request;
    
    public WSController(WSRequest request) {
        this.request = request;
    }
    
    private void connect() {
//        soapClient = new  SoapObject(request.getServiceURL(), request.getServiceMethod()); 
//        Enumeration en = request.elements();
//        while (en.hasMoreElements()) {
//            String name = (String)en.nextElement(); 
//            soapClient.addProperty(name, request.get(name));
//        }
//        transport = new HttpTransport(request.getServiceURL(), request.getHttpMethod());
    
        //soapClient = new  SoapObject("http://localhost.developer:81/axis/StockQuoteService.jws", "getQuote"); 
        //Enumeration en = request.elements();
        //while (en.hasMoreElements()) {
          ///  String name = (String)en.nextElement(); 
           // soapClient.addProperty(name, request.get(name));
        //}
        //soapClient.addProperty("symbol", "blablabla");
        //transport = new HttpTransport("http://localhost.developer:81/axis/StockQuoteService.jws", "get");
        
        
    }
    /*
    public SoapObject call() throws IOException {
        this.connect();
        try {
            SoapObject s = (SoapObject)transport.call(soapClient);
            return s;    
        } catch (IOException ioEx) {
            ioEx.printStackTrace();
            throw ioEx;
        }
    }
    
    public SoapObject getSoapClient() {
        return soapClient;
    }

    public HttpTransport getTransport() {
        return transport;
    }
    */
}
